home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1996 June
/
MACPOWER-1996-06.ISO.7z
/
MACPOWER-1996-06.ISO
/
MacPowerオリジナル
/
キョービのプログラマー
/
リバースクライアント北白川 Folder
/
Souce Code (CodeWarrior7)
/
KMPL.h
< prev
next >
Wrap
Text File
|
1996-02-05
|
2KB
|
135 lines
//##
//## === Kitashirakawa Macintosh Programming Laboraroty ===
//## === Reverse Client Thikin' Module ===
//##
//## File: KMPL.h
//##
//## Author: Takenori Kabeya
//## (c)1996, all rights reserved.
//##
//## Version: 1.0
//##
//## History:
//## Created on Feb. 1, 1996.
//##
//##
#pragma once
#include "Reverse.h"
#define Max(X,Y) ( ( (X) > (Y) ) ? (X) : (Y) )
#define Min(X,Y) ( ( (X) < (Y) ) ? (X) : (Y) )
#define Abs(X) ( ( (X) < 0 ) ? (-(X)) : (X) )
#define rALRT_About 128
#define kMin 0
#define kMax (BOARD_SIZE-1)
#if kMax < 5
#undef kMax
#endif
typedef long Coord;
typedef long CellIndex;
typedef long NumReverse;
typedef long NumCell;
typedef long Color;
//
// ユーティリティ関数のプロトタイプ宣言
//
Boolean
IsStartOfGame(
BOARD inBoard );
Boolean
IsEmpty(
BOARD inBoard,
Point inCell );
Boolean
IsOnBoard(
Point inCell );
Boolean
IsCorner(
Point inCell );
Boolean
IsCornerSide(
Point inCell );
Boolean
IsEdge(
Point inCell );
Boolean
IsOnLine(
Point inCell1,
Point inCell2 );
Boolean
IsSuccessive(
BOARD inBoard,
Point inFrom,
Point inTo,
Color inColor );
Color
GetReverseColor(
Color inColor );
NumCell
GetNextState(
REVERSE_REC* inCurrentStateP,
Point inPlaceCell,
REVERSE_REC* outNextStateP,
PLACE_INFO* outPlaceInfoP );
NumReverse
CalcGain(
REVERSE_REC* inCurrentStateP,
Point inPlaceCell );
NumCell
CountStones(
BOARD inBoard,
Color inColor );
void
ReverseStones(
Point inPlaceCell,
Color inColor,
BOARD ioBoard );
CellIndex
FindLocalMinimumCellIndex(
PLACE_INFO* inPlaceInfoP );
CellIndex
FindLocalMaximumCellIndex(
PLACE_INFO* inPlaceInfoP );
CellIndex
FindLocalMinimumCellIndexFrom(
PLACE_INFO* inPlaceInfoP,
CellIndex inFrom );
CellIndex
FindLocalMaximumCellIndexFrom(
PLACE_INFO* inPlaceInfoP,
CellIndex inFrom );
CellIndex
FindCell(
PLACE_INFO* inPlaceInfoP,
Point inCell );
CellIndex
FindCellFrom(
PLACE_INFO* inPlaceInfoP,
Point inCell,
CellIndex inFrom );